'use strict';

const Service = require('egg').Service;

class ServerErrorService extends Service {
  async list() {
    const { LogServerError } = this.ctx.model;
    return await LogServerError.listData(this.ctx.query);
  }

  async count() {
    const { LogServerError } = this.ctx.model;
    return await LogServerError.getCount(this.ctx.query);
  }

  async destroy() {
    const { LogServerError } = this.ctx.model;
    return LogServerError.removeModel(this.ctx.params.id);
  }
}

module.exports = ServerErrorService;
